U10. Other Commands UtilIt also supports several miscellaneous commands that deal with setting the cursor, posting events, and idle procs used with printing. ChgCur 121 a,fCursor Resets the cursor to that designated by parameter a where 0 = Arrow, 1 = IBeam, 2 = Cross, 3 = Plus, 4 = Watch, and all other values are interpreted as CURS res ID numbers. If FaceIt or ViewIt is in use, then the fCursor variable is also set equal to -1 to force the cursor to be updated when control is finally returned to FaceIt or ViewIt. PstEvt 122 a,b,c,d Creates a new event and puts it into the event queue where the event record will be defined as what = a, message = b, where = c, modifiers = d, and the when field will be set to the current time. PstEvt offers greater control over the posted event than the corresponding toolbox call PostEvent. When operating under FaceIt, FaceSt, or ViewIt, event 13 (a = 13) is used to pass messages from modules to the main program. PstEvt places these events in a private queue that is given priority over the Macintosh raw event queue. Events from this private queue are seen by the program as menu or "pseudo-menu" events where, b -> message -> uMenuID c -> where -> uResult d -> modifiers -> uMenuItem NOTE: PstEvt cannot be used under A/UX unless posting an event 13 to UtilIt's private queue. PstNot 124 a,uResult This command posts a "Notice" type message to FaceWare modules. It is typically used with the FaceSt (FaceStub) module to post "Save Documents" (a = 4096) and "Clean System" (a = 32) Notices to modules before quitting the program. In the case of the "Save Documents" message, uResult will return with a non-zero value if the user cancels the operation. SetIdl 131 a,b,c,uResult EndIdl 132 SetIdl sets the "pIdleProc" field of the designated print record equal to UtilIt's own background idle procedure that supports a "rotating" cursor, use of the command key to pause printing, & command-period to halt printing, where a = the print record handle (type "THPrint") b = first of 5 successive CURS resources to use for cursor rotation, where the first cursor is displayed during a pause and remaining are displayed in succession during printing (if b = 0, then UtilIt's own cursors are used (b = 1110)) c = tick delay between cursor change (governs speed of rotation) Call SetIdl just before calling PrOpenDoc. If the user terminates printing by pressing command-period, then uResult is set equal to -1 and the appropriate printing error is posted. The idle procedure allocates a temporary block and stores its address at $A80. When finished printing, call EndIdl to clear the "pIdleProc" field of the print record, dispose of the temporary block, and restore the previous value at $A80. Be careful not to call EndIdl without calling SetIdl.